<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<html>
<head>
    <title>楼宇信息管理</title>
    <meta name="decorator" content="ani"/>
    <script type="text/javascript">

        $(document).ready(function () {

            $('#builddate').datetimepicker({
                format: "YYYY-MM-DD HH:mm:ss"
            });
        });

        function save() {
            var isValidate = jp.validateForm('#inputForm');//校验表单
            if (!isValidate) {
                return false;
            } else {
                jp.loading();
                jp.post("${ctx}/property/buildinfo/propertyBuildinginfo/save", $('#inputForm').serialize(), function (data) {
                    if (data.success) {
                        jp.getParent().refresh();
                        var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                        parent.layer.close(dialogIndex);
                        jp.success(data.msg)

                    } else {
                        jp.error(data.msg);
                    }
                })
            }

        }
    </script>
</head>
<body class="bg-white">
<form:form id="inputForm" modelAttribute="propertyBuildinginfo" class="form-horizontal">
    <form:hidden path="id"/>
    <form:hidden path="village.code"/>
    <table class="table table-bordered">
        <tbody>
        <tr>
            <td class="width-15 active"><label class="pull-right"><font color="red">*</font>楼宇名称：</label></td>
            <td class="width-35">
                <form:input path="buildingname" htmlEscape="false" class="form-control required"/>
            </td>
            <td class="width-15 active"><label class="pull-right">楼层数：</label></td>
            <td class="width-35">
                <form:input path="floornum" htmlEscape="false" class="form-control "/>
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">楼层房屋数：</label></td>
            <td class="width-35">
                <form:input path="floorromenum" htmlEscape="false" class="form-control "/>
            </td>
            <td class="width-15 active"><label class="pull-right">建成时间：</label></td>
            <td class="width-35">
                <div class='input-group form_datetime' id='builddate'>
                    <input type='text' name="builddate" class="form-control "
                           value="<fmt:formatDate value="${propertyBuildinginfo.builddate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
                    <span class="input-group-addon">
								<span class="glyphicon glyphicon-calendar"></span>
							</span>
                </div>
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">楼宇类型：</label></td>
            <td class="width-35">
                <form:select path="buildingtype" class="form-control ">
                    <form:option value="" label=""/>
                    <form:options items="${fns:getDictList('buildingtype')}" itemLabel="label" itemValue="value"
                                  htmlEscape="false"/>
                </form:select>
            </td>
            <td class="width-15 active"><label class="pull-right">楼宇用途：</label></td>
            <td class="width-35">
                <form:select path="buildinguse" class="form-control ">
                    <form:option value="" label=""/>
                    <form:options items="${fns:getDictList('buildinguse')}" itemLabel="label" itemValue="value"
                                  htmlEscape="false"/>
                </form:select>
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">楼宇结构：</label></td>
            <td class="width-35">
                <form:select path="buildingstructure" class="form-control ">
                    <form:option value="" label=""/>
                    <form:options items="${fns:getDictList('buildingstructure')}" itemLabel="label" itemValue="value"
                                  htmlEscape="false"/>
                </form:select>
            </td>
            <td class="width-15 active"></td>
            <td class="width-35"></td>
        </tr>
        </tbody>
    </table>
</form:form>
</body>
</html>